// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "SimpleGameMode.generated.h"

/**
 * 
 */
UCLASS()
class SIMPLE_API ASimpleGameMode : public AGameModeBase
{
	GENERATED_BODY()
	
public:
	ASimpleGameMode();

	UFUNCTION()
	void Killed(AController* Killer,AController* KilledPlayer);
	
	UPROPERTY(EditDefaultsOnly, Category = Simple)
	float KillScore;
	
	FTimerHandle TimerHandle_GameDefultTime;

	void UpdateGame();

	void SpawnBot(FTransform SpawnTransform);

	UPROPERTY(EditDefaultsOnly, Category = Simple)
	int32 BotNumber;

	

	TArray<class AActor*> OutAPlayerStartArr;

	UPROPERTY(EditDefaultsOnly, Category = Simple)
	int32 SpawnBotTime;

	UPROPERTY(EditDefaultsOnly, Category = Simple)
	int32 AIUpdateTime;

	int32 GameStartTime;

	UPROPERTY(EditDefaultsOnly, Category = Simple)
	TSubclassOf<APawn> AIPawn;

	UPROPERTY(EditDefaultsOnly, Category = Simple)
	TSubclassOf<APawn> PlayerPawn;

	UPROPERTY(EditDefaultsOnly, Category = Simple)
	TSubclassOf<class APlayerStart> BotPlayerStart;

	UPROPERTY(EditDefaultsOnly, Category = Simple)
	class UBehaviorTree* BehaviorTree;

	int32 bCanUpdateBot : 1;


	virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;

protected:

	virtual void BeginPlay() override;

};
